package cn.cdeden.knowledge.domain;

import cn.cdeden.knowledge.domain.dto.TeamFilesReviewDto;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.*;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* @author Chen
* @date 2023-11-23
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@AutoMappers({@AutoMapper(target = TeamFilesReviewDto.class)})
@TableName("team_files_review")
public class TeamFilesReview implements Serializable {
    private static final long serialVersionUID = 1L;

//    @ApiModelProperty(value = "编号")
    @TableId(type= IdType.AUTO)
    private Long id;

//    @ApiModelProperty(value = "用户编号")
    private String userId;

//    @ApiModelProperty(value = "创建时间")
    @TableField(fill= FieldFill.INSERT)
    private Date createTime;

//    @ApiModelProperty(value = "回复人")
    private String replier;

//    @ApiModelProperty(value = "树节点id")
    private String treeNodeId;

//    @ApiModelProperty(value = "内容")
    private String content;

    public void copyFrom(TeamFilesReview source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
